import { registerPanelItemProvider } from '@ibiz-template/runtime';
import { withInstall } from '@ibiz-template/vue3-util';
import { App } from 'vue';
import AIAssistantButton from './ai-assistant-button';
import { AIAssistantButtonProvider } from './ai-assistant-button.provider';

export const IBizAssistantButton = withInstall(
  AIAssistantButton,
  function (v: App) {
    v.component(AIAssistantButton.name!, AIAssistantButton);
    registerPanelItemProvider(
      'CUSTOM_AI_ASSISTANT_BUTTON',
      () => new AIAssistantButtonProvider(),
    );
  },
);

export default IBizAssistantButton;
